// 排序分类组件
import React from 'react';
import classNames from 'classnames';

export class Tabs extends React.Component {
  render() {
    return (
      // 排序tab
      <div className="tabs-order">
        {this.props.tabs.map((item) => (
          <div
            className={classNames({ on: item.type === this.props.active })}
            key={item.id}
            onClick={() => this.props.changeSortType(item.type)}
          >
            按{item.name}排序
          </div>
        ))}
      </div>
    );
  }
}

export default Tabs;
